package com.qf.controller;

import com.qf.service.UserService;
import com.qf.util.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController2 {
    @Autowired
    private UserService userService;
    @RequestMapping("/list")
    @ResponseBody
    public ResultData list(){
        //调用业务层
        ResultData data=userService.findAll();
        return data;
    }
}
